#########################################################
#
#  The makefile for GNU mingw-w64 Compilers.
#   (http://sourceforge.net/projects/mingw-w64/)
#  This makefile is for GNU make.
#
#########################################################

include incMake\mingw-w64\config.mak


# target description #

debug:
	$(MAKE) BUILD=debug    -f Makefile.mingw-w64.mak  all
release:
	$(MAKE) BUILD=release  -f Makefile.mingw-w64.mak  all

all: mk_dir libn2base n2asm_x86 n2asm_x8664

libn2base:
	$(MAKE) BUILD=$(BUILD)  -f incMake\mingw-w64\libn2base.mak
n2asm_x86: libn2base
	$(MAKE) BUILD=$(BUILD)  -f incMake\mingw-w64\n2asm_x86.mak
n2asm_x8664: libn2base
	$(MAKE) BUILD=$(BUILD)  -f incMake\mingw-w64\n2asm_x8664.mak



##########################################################
mk_dir:
	cmd.exe /C if not exist $(OBJDIR) mkdir $(OBJDIR)
	cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR)
clean:
	echo Removing ...
	rm -f $(OBJDIR)/*.o
	rm -f $(OBJDIR)/*/*.o
	rm -f $(BINDIR)/*.o
	rm -f $(BINDIR)/*.exe
	rm -f $(BINDIR)/*.dll
	rm -f $(BINDIR)/*.a
	rm -f $(BINDIR)/*.ilc
	rm -f $(BINDIR)/*.ild
	rm -f $(BINDIR)/*.ilf
	rm -f $(BINDIR)/*.ils
	rm -f $(BINDIR)/*.ilk
	rm -f $(BINDIR)/*.pdb
	rm -f $(BINDIR)/*.exp
	rm -f $(BINDIR)/*.tds
	rm -f $(BINDIR)/*.map
	echo clean finished.
                   
                   